import axios from './api' // 倒入 api
import config from './config.js' // 倒入默认配置
export const BASEURL = config.baseURL

/* 将所有接口统一起来便于维护
 * 如果项目很大可以将 url 独立成文件，接口分成不同的模块
 */

export const IMAGEPATH = BASEURL + 'appserver'

// 获取验证码
export const USERCAPTCHA = BASEURL + '/usercenter/captcha'

// 登录接口
export const REQUESTLOGIN = (params) => {
  return axios({
    url: 'login',
    method: 'POST',
    data: params,
  })
}

// 系统管理-获取组织机构树
export const GETORGANIZATIONTREE = (params) => {
  return axios({
    url: 'appserver/mng/organization/orgtree',
    method: 'GET',
    data: params,
  })
}

// 系统管理-获取用户列表
export const GETUSERSEARCH = (params) => {
  return axios({
    url: 'appserver/mng/user/search',
    method: 'GET',
    params,
  })
}

// 系统管理-获取角色列表
export const GETROLESEARCH = (params) => {
  return axios({
    url: '/appserver/mng/role/search',
    method: 'GET',
    params,
  })
}

// 系统管理-角色管理-删除角色
export const DELETEROLE = (params) => {
  return axios({
    url: '/appserver/mng/role/delete',
    method: 'GET',
    params,
  })
}

// 系统管理-角色管理-租户可见度
export const GETROLEVISIBILITY = (params) => {
  return axios({
    url: 'appserver/mng/role/visibility',
    method: 'GET',
    params,
  })
}

// 系统管理-角色管理-获取菜单
export const GETMENUCHECKEDTREE = (params) => {
  return axios({
    url: '/appserver/mng/menu/checkedtree',
    method: 'GET',
    params,
  })
}

// 系统管理-角色管理-获取角色信息
export const GETROLEINFO = (params) => {
  return axios({
    url: '/appserver/mng/role/info',
    method: 'GET',
    params,
  })
}

// 系统管理-角色管理-新增角色
export const ADDROLE = (params) => {
  return axios({
    url: '/appserver/mng/role/add',
    method: 'POST',
    data: params,
  })
}

// 系统管理-角色管理-编辑角色
export const EDITROLEINFO = (params) => {
  return axios({
    url: '/appserver/mng/role/edit',
    method: 'POST',
    data: params,
  })
}

// 系统管理-组织管理（部门管理）-获取组织列表
export const ORGANIZATIONSEARCH = (params) => {
  return axios({
    url: '/appserver/mng/organization/search',
    method: 'GET',
    params,
  })
}

// 系统管理-组织管理（部门管理）-获取组织-子节点
export const GETORGANIZATIONCHILDREN = (params) => {
  return axios({
    url: '/usercenter/organization/children',
    method: 'GET',
    params,
  })
}

// 系统管理-组织管理（部门管理）- 新增组织
export const ADDORGANIZATION = (params) => {
  return axios({
    url: '/usercenter/organization/add',
    method: 'POST',
    data: params,
  })
}

// 系统管理-组织管理（部门管理）- 编辑组织
export const EDITORGANIZATION = (params) => {
  return axios({
    url: '/usercenter/organization/edit',
    method: 'POST',
    data: params,
  })
}

// 系统管理-组织管理（部门管理）- 获取组织信息
export const GETORGANIZATIONINFO = (params) => {
  return axios({
    url: '/usercenter/organization/info',
    method: 'GET',
    params,
  })
}

// 系统管理-组织管理（部门管理）- 删除组织
export const DELETEORGANIZATION = (params) => {
  return axios({
    url: '/usercenter/organization/delete',
    method: 'GET',
    params,
  })
}

// 系统管理-菜单管理- 获取菜单列表
export const GETMENULIST = (params) => {
  return axios({
    url: '/appserver/mng/menu/search',
    method: 'GET',
    params,
  })
}

// 系统管理-菜单管理- 获取菜单子节点
export const GETMENUCHILDREN = (params) => {
  return axios({
    url: '/appserver/mng/menu/children',
    method: 'GET',
    params,
  })
}

// 系统管理-菜单管理- 新增菜单
export const ADDMENU = (params) => {
  return axios({
    url: '/appserver/mng/menu/add',
    method: 'POST',
    data: params,
  })
}

// 系统管理-菜单管理- 删除菜单
export const DELETEMENU = (params) => {
  return axios({
    url: '/appserver/mng/menu/delete',
    method: 'GET',
    params,
  })
}

// 系统管理-菜单管理- 获取权限菜单
export const GETPERMTREE = (params) => {
  return axios({
    url: '/appserver/mng/menu/permtree',
    method: 'GET',
    params,
  })
}

// 系统管理-菜单管理- 获取菜单信息
export const GETMENUINFO = (params) => {
  return axios({
    url: '/appserver/mng/menu/info',
    method: 'GET',
    params,
  })
}

// 系统管理-菜单管理- 获取菜单信息
export const EDITMENUINFO = (params) => {
  return axios({
    url: '/appserver/mng/menu/edit',
    method: 'POST',
    data: params,
  })
}

// 用户管理-注册用户
export const GETREGISTERSEARCH = (params) => {
  return axios({
    url: '/admin/custuser/register/search',
    method: 'GET',
    params,
  })
}

// 用户管理-注册用户-获取详情
export const GETREGISTERINFO = (params) => {
  return axios({
    url: '/admin/custuser/register/info',
    method: 'GET',
    params,
  })
}

// 用户管理-实名认证列表
export const GETCERTSEARCH = (params) => {
  return axios({
    url: '/admin/custuser/cert/search',
    method: 'GET',
    params,
  })
}

// 用户管理-会员开通列表
export const GETCUSTUSERVIPSEARCH = (params) => {
  return axios({
    url: '/admin/custuser/vip/search',
    method: 'GET',
    params,
  })
}

// 用户管理-充值会员-获取统计数据
export const GETCUSTUSERVIPSTATISTIC = (params) => {
  return axios({
    url: '/admin/custuser/vip/statistic',
    method: 'GET',
    params,
  })
}

// 用户管理-会员详情
export const GETVIPINFO = (params) => {
  return axios({
    url: '/admin/custuser/vip/info',
    method: 'GET',
    params,
  })
}

// 用户管理-封禁用户列表
export const GETBANNEDSEARCH = (params) => {
  return axios({
    url: '/admin/custuser/banned/search',
    method: 'GET',
    params,
  })
}

// 用户管理-封禁用户列表-解封用户
export const LIFTBANUSER = (params) => {
  return axios({
    url: '/admin/custuser/liftban',
    method: 'POST',
    data: params,
  })
}

// 用户管理-解封用户列表
export const GETLIFTBANSEARCH = (params) => {
  return axios({
    url: '/admin/custuser/liftban/search',
    method: 'GET',
    params,
  })
}

// 用户管理-黑名单列表
export const GETBLACKLISTSEARCH = (params) => {
  return axios({
    url: '/admin/custuser/blacklist/search',
    method: 'GET',
    params,
  })
}

// 动态管理-相册审核-未审核列表
export const GETMOMENTSEARCH = (params) => {
  return axios({
    url: '/admin/moment/album/search',
    method: 'GET',
    params,
  })
}

// 动态管理-相册审核-已审核列表
export const GETALBUMAUDITEDSEARCH = (params) => {
  return axios({
    url: '/admin/moment/album/audited/search',
    method: 'GET',
    params,
  })
}

// 动态管理-相册审核-审核相册
export const SAVEALBUMAUDIT = (params) => {
  return axios({
    url: '/admin/moment/audit/album',
    method: 'POST',
    data: params,
  })
}

// 动态管理-相册审核-获取相册详情
export const GETALBUMINFO = (params) => {
  return axios({
    url: '/admin/moment/album/info',
    method: 'GET',
    params,
  })
}

// 动态管理-动态未审核-列表
export const GETDYNAMICMOMENTSEARCH = (params) => {
  return axios({
    url: '/admin/moment/moment/search',
    method: 'GET',
    params,
  })
}

// 动态管理-动态已审核-列表
export const GETDYNAMICMOMENTAUDITEDSEARCH = (params) => {
  return axios({
    url: '/admin/moment/moment/audited/search',
    method: 'GET',
    params,
  })
}

// 动态管理-动态未审核-动态详情
export const GETMOMENTINFO = (params) => {
  return axios({
    url: '/admin/moment/moment/info',
    method: 'GET',
    params,
  })
}

// 动态管理-动态未审核-动态审核
export const SAVEAUDITMOMENT = (params) => {
  return axios({
    url: '/admin/moment/audit/moment',
    method: 'POST',
    data: params,
  })
}

// 动态管理-评论未审核列表
export const GETCOMMENTSEARCH = (params) => {
  return axios({
    url: '/admin/moment/comment/search',
    method: 'GET',
    params,
  })
}

// 动态管理-评论已审核列表
export const GETCOMMENTAUDITEDSEARCH = (params) => {
  return axios({
    url: '/admin/moment/comment/audited/search',
    method: 'GET',
    params,
  })
}

// 动态管理-评论未审核-审核评论
export const SAVEAUDITCOMMENT = (params) => {
  return axios({
    url: '/admin/moment/audit/comment',
    method: 'POST',
    data: params,
  })
}

// 动态管理-举报-未审核列表
export const GETTIPOFFSEARCH = (params) => {
  return axios({
    url: '/admin/moment/tipoff/search',
    method: 'GET',
    params,
  })
}

// 动态管理-举报-已审核列表
export const GETTIPOFFAUDITEDSEARCH = (params) => {
  return axios({
    url: '/admin/moment/tipoff/audited/search',
    method: 'GET',
    params,
  })
}

// 动态管理-举报-未审核-获取详情
export const GETCUSTUSERTIPOFFINFO = (params) => {
  return axios({
    url: '/admin/moment/tipoff/info',
    method: 'GET',
    params,
  })
}

// 动态管理-举报-未审核-举报审核
export const SAVEMOMENTAUDITALBUM = (params) => {
  return axios({
    url: '/admin/moment/audit/tipoff',
    method: 'POST',
    data: params,
  })
}

// 资金管理-礼物打赏-列表
export const GETORDERREWARDSEARCH = (params) => {
  return axios({
    url: '/admin/order/reward/search',
    method: 'GET',
    params,
  })
}

// 资金管理-礼物打赏-打赏/收到的礼物详情列表
export const GETORDERREWARDBILLS = (params) => {
  return axios({
    url: '/admin/order/reward/bills',
    method: 'GET',
    params,
  })
}

// 资金管理-礼物管理-列表
export const GETGIFTSEARCH = (params) => {
  return axios({
    url: '/admin/gift/search',
    method: 'GET',
    params,
  })
}

// 资金管理-月卡管理-列表
export const GETVIPSEARCH = (params) => {
  return axios({
    url: '/admin/vip/search',
    method: 'GET',
    params,
  })
}

// 公共接口-文件上传
export const UPLOADFILEPATH = BASEURL + 'publiccenter/basic/file/upload2dfs'

// 资金管理-礼物管理-新增礼物
export const ADDGIFTINFO = (params) => {
  return axios({
    url: '/admin/gift/add',
    method: 'POST',
    data: params,
  })
}

// 资金管理-礼物管理-编辑礼物
export const EDITGIFTINFO = (params) => {
  return axios({
    url: '/admin/gift/edit',
    method: 'POST',
    data: params,
  })
}

// 资金管理-礼物管理-删除礼物
export const DELETEGIFTINFO = (params) => {
  return axios({
    url: '/admin/gift/delete',
    method: 'GET',
    params,
  })
}

// 资金管理-月卡管理-新增月卡(会员选项)
export const ADDVIPINFO = (params) => {
  return axios({
    url: '/admin/vip/add',
    method: 'POST',
    data: params,
  })
}

// 资金管理-月卡管理-编辑月卡(会员选项)
export const EDITVIPINFO = (params) => {
  return axios({
    url: '/admin/vip/edit',
    method: 'POST',
    data: params,
  })
}

// 资金管理-月卡管理-删除月卡(会员选项)
export const DELETEVIPINFO = (params) => {
  return axios({
    url: '/admin/vip/delete',
    method: 'GET',
    params,
  })
}

// 资金管理-充值记录-获取列表
export const GETORDERCHARGESEARCH = (params) => {
  return axios({
    url: '/admin/order/charge/search',
    method: 'GET',
    params,
  })
}

// 资金管理-充值记录-获取充值统计数据
export const GETORDERCHARGESTATISTIC = (params) => {
  return axios({
    url: '/admin/order/charge/statistic',
    method: 'GET',
    params,
  })
}

// 资金管理-内部充值-获取充值记录
export const GETFUNDINNERCHARGESEARCH = (params) => {
  return axios({
    url: '/admin/fund/inner/charge/search',
    method: 'GET',
    params,
  })
}

// 资金管理-内部充值-新增充值
export const SAVEFUNDINNERCHARGEINFO = (params) => {
  return axios({
    url: '/admin/fund/inner/charge',
    method: 'POST',
    data: params,
  })
}

// 资金管理-提现管理-提现列表
export const GETORDERWITHDRAWSEARCH = (params) => {
  return axios({
    url: '/admin/order/withdraw/search',
    method: 'GET',
    params,
  })
}

// 资金管理-提现管理-提交审核
export const APPROVALORDERWITHDRAW = (params) => {
  return axios({
    url: '/admin/order/withdraw/approval',
    method: 'POST',
    data: params,
  })
}

// 资金管理-分成记录-获取分成列表
export const GETORDERPROFITSEARCH = (params) => {
  return axios({
    url: '/admin/order/profit/search',
    method: 'GET',
    params,
  })
}

// 资金管理-分成设置-获取分成配置
export const GETFUNDPROFITSHARESETTING = (params) => {
  return axios({
    url: '/admin/fund/profit/sharesetting',
    method: 'GET',
    params,
  })
}

// 资金管理-分成设置-获取分成配置
export const SAVEPROFITSHARESETTING = (params) => {
  return axios({
    url: '/admin/fund/profit/share/setting',
    method: 'POST',
    data: params,
  })
}

// 用户管理-注册用户-封禁用户
export const SAVECUSTUSERBAN = (params) => {
  return axios({
    url: '/admin/custuser/ban',
    method: 'POST',
    data: params,
  })
}

// 用户管理-注册用户-解封用户
export const SAVECUSTUSERLIFTBAN = (params) => {
  return axios({
    url: '/admin/custuser/liftban',
    method: 'POST',
    data: params,
  })
}

// 用户管理-注册用户-导出excel
export const REGISTERLISTEXPORT = BASEURL + 'admin/custuser/register/export'

// 用户管理-实名认证-导出excel
export const CERTLISTEXPORT = BASEURL + 'admin/custuser/cert/export'

// 用户管理-充值会员-导出excel
export const VIPLISTEXPORT = BASEURL + 'admin/custuser/vip/export'

// 用户管理-封禁用户-导出excel
export const BANNEDLISTEXPORT = BASEURL + 'admin/custuser/banned/export'

// 用户管理-解封用户-导出excel
export const LIFTBANLISTEXPORT = BASEURL + 'admin/custuser/liftban/export'

// 用户管理-相册审核-待审核-导出excel
export const ALBUMLISTEXPORT = BASEURL + 'admin/moment/album/export'

// 用户管理-相册审核-已审核-导出excel
export const ALBUMAUDITEDLISTEXPORT = BASEURL + 'admin/moment/audited/export'

// 用户管理-动态审核-待审核-导出excel
export const MOMENTLISTEXPORT = BASEURL + 'admin/moment/moment/export'

// 用户管理-动态审核-已审核-导出excel
export const MOMENTAUDITEDLISTEXPORT = BASEURL + 'admin/moment/audited/export'

// 用户管理-评论审核-待审核-导出excel
export const COMMENTLISTEXPORT = BASEURL + 'admin/moment/comment/export'

// 用户管理-评论审核-已审核-导出excel
export const COMMENTAUDITEDLISTEXPORT =
  BASEURL + 'admin/moment/comment/audited/export'

// 用户管理-举报审核-待审核-导出excel
export const TIPOFFLISTEXPORT = BASEURL + 'admin/moment/tipoff/export'

// 用户管理-举报审核-已审核-导出excel
export const TIPOFFAUDITEDLISTEXPORT =
  BASEURL + 'admin/moment/tipoff/audited/export'

// 用户管理-礼物打赏-导出excel
export const ORDERREWARDLISTEXPORT = BASEURL + 'admin/order/reward/export'

// 用户管理-充值记录-导出excel
export const ORDERCHARGELISTEXPORT = BASEURL + 'admin/order/charge/export'

// 用户管理-提现管理-导出excel
export const ORDERWITHDRAWLISTEXPORT = BASEURL + 'admin/order/withdraw/export'

// 用户管理-内部充值-导出excel
export const FUNDINNERCHARGELISTEXPORT =
  BASEURL + 'admin/fund/inner/charge/export'

// 用户管理-分成记录-导出excel
export const ORDERPROFITLISTEXPORT = BASEURL + 'admin/order/profit/export'

// 资金管理-充值记录-获取充值详情
export const GETORDERCHARGEINFO = (params) => {
  return axios({
    url: '/admin/order/charge/info',
    method: 'GET',
    params,
  })
}

// 获取订单列表
export const GETORDERLIST = (params) => {
  return axios({
    url: 'appserver/mng/order/search',
    method: 'GET',
    params,
  })
}

// 导出订单列表
export const ORDEREXPORTURL = BASEURL + 'appserver/mng/order/export'

// 查询渠道列表
export const GETCHANNELLIST = (params) => {
  return axios({
    url: 'appserver/mng/channel/search',
    method: 'GET',
    params,
  })
}

// 导出渠道列表
export const CHANNELEXPORTURL = BASEURL + 'appserver/mng/channel/export'

// 查询产品列表
export const GETPRODUCTLIST = (params) => {
  return axios({
    url: 'appserver/mng/product/search',
    method: 'GET',
    params,
  })
}

// 导出产品列表
export const PRODUCTEXPORTURL = BASEURL + 'appserver/mng/product/export'

// 查询产品详情
export const GETORDERINFO = (params) => {
  return axios({
    url: 'appserver/mng/order/info',
    method: 'GET',
    params,
  })
}

// 文件上传
export const FILEUPLOADURL = BASEURL + 'appserver/mng/file/upload'

// 新增产品
export const ADDPRODUCTINFO = (params) => {
  return axios({
    url: 'appserver/mng/product/add',
    method: 'POST',
    data: params,
  })
}

// 产品管理-配置
export const PRODUCTSETTING = (params) => {
  return axios({
    url: 'appserver/mng/product/setting',
    method: 'POST',
    data: params,
  })
}

// 产品管理-获取配置
export const GETPRODUCTSETTING = (params) => {
  return axios({
    url: 'appserver/mng/product/getsetting',
    method: 'GET',
    params,
  })
}

// 产品管理-产品上下架
export const PRODUCTUPLOW = (params) => {
  return axios({
    url: 'appserver/mng/product/uplow',
    method: 'GET',
    params,
  })
}

// 渠道管理-获取渠道推广链接
export const GETCHANNELURL = (params) => {
  return axios({
    url: 'appserver/mng/channel/geturl',
    method: 'GET',
    params,
  })
}

// 渠道管理-获取渠道推广配置
export const GETCHANNELSETTING = (params) => {
  return axios({
    url: 'appserver/mng/channel/getsetting',
    method: 'GET',
    params,
  })
}

// 渠道管理-保存配置
export const CHANNELINFOSETTING = (params) => {
  return axios({
    url: 'appserver/mng/channel/setting',
    method: 'POST',
    data: params,
  })
}

// 系统管理-账号管理-新增账号-获取角色列表
export const GETROLESIMPLELIST = (params) => {
  return axios({
    url: 'appserver/mng/role/simplelist',
    method: 'GET',
    params,
  })
}

// 系统管理-账号管理-新增账号-获取渠道列表
export const GETCHANNELOPTIONS = (params) => {
  return axios({
    url: 'appserver/mng/channel/options',
    method: 'GET',
    params,
  })
}

// 系统管理-账号管理-新增账号
export const ADDUSERINFO = (params) => {
  return axios({
    url: 'appserver/mng/user/add',
    method: 'POST',
    data: params,
  })
}

// 系统管理-账号管理-获取用户详情
export const GETUSERINFO = (params) => {
  return axios({
    url: 'appserver/mng/user/info',
    method: 'GET',
    params,
  })
}

// 系统管理-账号管理-修改账号
export const EDITUSERINFO = (params) => {
  return axios({
    url: 'appserver/mng/user/edit',
    method: 'POST',
    data: params,
  })
}

// 系统管理-账号管理-删除用户
export const DELETEUSERINFO = (params) => {
  return axios({
    url: 'appserver/mng/user/delete',
    method: 'GET',
    params,
  })
}

// 系统管理-渠道管理-新增渠道
export const ADDCHANNELINFO = (params) => {
  return axios({
    url: 'appserver/mng/channel/add',
    method: 'POST',
    data: params,
  })
}

// 系统管理-产品管理-获取产品详情
export const GETPRODUCTINFO = (params) => {
  return axios({
    url: 'appserver/mng/product/info',
    method: 'GET',
    params,
  })
}

// 系统管理-产品管理-编辑产品详情
export const EDITPRODUCTINFO = (params) => {
  return axios({
    url: 'appserver/mng/product/edit',
    method: 'POST',
    data: params,
  })
}

// 系统管理-商品管理-获取商品列表
export const GETGOODSSEARCH = (params) => {
  return axios({
    url: 'appserver/mng/goods/search',
    method: 'GET',
    params,
  })
}

// 系统管理-商品管理-新增商品
export const ADDGOODSINFO = (params) => {
  return axios({
    url: 'appserver/mng/goods/add',
    method: 'POST',
    data: params,
  })
}

// 系统管理-商品管理-获取商品详情
export const GETGOODSINFO = (params) => {
  return axios({
    url: 'appserver/mng/goods/info',
    method: 'GET',
    params,
  })
}

// 系统管理-商品管理-编辑商品
export const EDITGOODSINFO = (params) => {
  return axios({
    url: 'appserver/mng/goods/edit',
    method: 'POST',
    data: params,
  })
}

// 系统管理-商品管理-上下架商品信息
export const UPLOWGOODSINFO = (params) => {
  return axios({
    url: 'appserver/mng/goods/uplow',
    method: 'GET',
    params,
  })
}
